package com.kly.user.db.dao;

import com.fqgj.common.base.BaseMapper;
import com.kly.user.db.entity.UserPromotionRecordEntity;

/**
 * User: user
 * Date: 2024-01-25
 * Time: 14:13:29.272
 */

public interface UserPromotionRecordDao extends BaseMapper<UserPromotionRecordEntity> {

    int queryCountByPromotionType(String userCode, Integer promotionType);


    UserPromotionRecordEntity getLastByUserCode(String userCode);


    /**
     * 读取最新促销的信息
     * @param userCode
     * @return
     */
    UserPromotionRecordEntity getUserPromotion(String userCode);

    /**
     * 读取最新促销数量
     * @param userCode
     * @return
     */
    Integer getUserPromotionCount(String userCode);
}